import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:convert';

part 'comment_vote_response.freezed.dart';
part 'comment_vote_response.g.dart';

@freezed
class CommentVoteResponse with _$CommentVoteResponse {
  const factory CommentVoteResponse({
    @JsonKey(name: "c") required int c,
    @JsonKey(name: "m") required String m,
    @JsonKey(name: "d") required D d,
  }) = _CommentVoteResponse;

  factory CommentVoteResponse.fromJson(Map<String, dynamic> json) =>
      _$CommentVoteResponseFromJson(json);
}

@freezed
class D with _$D {
  const factory D({
    @JsonKey(name: "isVote") required int isVote,
  }) = _D;

  factory D.fromJson(Map<String, dynamic> json) => _$DFromJson(json);
}
